<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>CSMFrustum - Three.js Docs</title>
	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<script src="../scripts/highlight.min.js"></script>
	<link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
	<link type="text/css" rel="stylesheet" href="../styles/page.css">
</head>
<body>
	<h1 translate="no">CSMFrustum</h1>
		<section>
			<header>
				<div class="class-description"><p>Represents the frustum of a CSM instance.</p></div>
			</header>
			<article>
				<h2 class="subsection-title">Import</h2>
				<p><span translate="no">CSMFrustum</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
				<pre><code class="language-js">import { CSMFrustum } from 'three/addons/csm/CSMFrustum.js';</code></pre>
				<div class="container-overview">
					<h2>Constructor</h2>
					<h3 class="name name-method" id="CSMFrustum" translate="no">new <a href="#CSMFrustum">CSMFrustum</a><span class="signature">( data : <span class="param-type"><a href="CSMFrustum.html#~Data">CSMFrustum~Data</a></span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Constructs a new CSM frustum.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>data</strong>
									</td>
									<td class="description last">
										<p>The CSM data.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<h2 class="subsection-title">Properties</h2>
				<div class="member">
					<h3 class="name" id="vertices" translate="no">.<a href="#vertices">vertices</a><span class="type-signature"> : Object</span> </h3>
					<div class="description">
						<p>An object representing the vertices of the near and
far plane in view space.</p>
					</div>
				</div>
				<div class="member">
					<h3 class="name" id="zNear" translate="no">.<a href="#zNear">zNear</a><span class="type-signature"> : number</span> </h3>
					<div class="description">
						<p>The zNear value. This value depends on whether the CSM
is used with WebGL or WebGPU. Both API use different
conventions for their projection matrices.</p>
					</div>
				</div>
				<h2 class="subsection-title">Methods</h2>
					<h3 class="name name-method" id="setFromProjectionMatrix" translate="no">.<a href="#setFromProjectionMatrix">setFromProjectionMatrix</a><span class="signature">( projectionMatrix : <span class="param-type"><a href="Matrix4.html">Matrix4</a></span>, maxFar : <span class="param-type">number</span> )</span><span class="type-signature"> : Object</span> </h3>
					<div class="method">
						<div class="description">
							<p>Setups this CSM frustum from the given projection matrix and max far value.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>projectionMatrix</strong>
									</td>
									<td class="description last">
										<p>The projection matrix, usually of the scene's camera.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>maxFar</strong>
									</td>
									<td class="description last">
										<p>The maximum far value.</p>
									</td>
								</tr>
							</tbody>
						</table>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> An object representing the vertices of the near and far plane in view space.</dt>
						</dl>
					</div>
					<h3 class="name name-method" id="split" translate="no">.<a href="#split">split</a><span class="signature">( breaks : <span class="param-type">Array.&lt;number></span>, target : <span class="param-type">Array.&lt;<a href="CSMFrustum.html">CSMFrustum</a>></span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Splits the CSM frustum by the given array. The new CSM frustum are pushed into the given
target array.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>breaks</strong>
									</td>
									<td class="description last">
										<p>An array of numbers in the range <code>[0,1]</code> the defines how the
CSM frustum should be split up.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>target</strong>
									</td>
									<td class="description last">
										<p>The target array that holds the new CSM frustums.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<h3 class="name name-method" id="toSpace" translate="no">.<a href="#toSpace">toSpace</a><span class="signature">( cameraMatrix : <span class="param-type"><a href="Matrix4.html">Matrix4</a></span>, target : <span class="param-type"><a href="CSMFrustum.html">CSMFrustum</a></span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Transforms the given target CSM frustum into the different coordinate system defined by the
given camera matrix.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>cameraMatrix</strong>
									</td>
									<td class="description last">
										<p>The matrix that defines the new coordinate system.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>target</strong>
									</td>
									<td class="description last">
										<p>The CSM to convert.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				<h2 class="subsection-title">Type Definitions</h2>
				<div class="member">
					<h3 class="name" id="~Data" translate="no">.<a href="#~Data">Data</a> </h3>
					<div class="description">
						<p>Constructor data of <code>CSMFrustum</code>.</p>
					</div>
<table class="props">
	<tbody>
		<tr>
				<td class="name">
					<strong>webGL</strong>
						<br>
<span class="param-type">boolean</span>
				</td>
			<td class="description last">
				<p>Whether this CSM frustum is used with WebGL or WebGPU.</p>
			</td>
		</tr>
		<tr>
				<td class="name">
					<strong>projectionMatrix</strong>
						<br>
<span class="param-type"><a href="Matrix4.html">Matrix4</a></span>
				</td>
			<td class="description last">
				<p>A projection matrix usually of the scene's camera.</p>
			</td>
		</tr>
		<tr>
				<td class="name">
					<strong>maxFar</strong>
						<br>
<span class="param-type">number</span>
				</td>
			<td class="description last">
				<p>The maximum far value.</p>
			</td>
		</tr>
	</tbody>
</table>
				</div>
				<h2 class="subsection-title">Source</h2>
				<p>
					<a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/csm/CSMFrustum.js" translate="no" target="_blank" rel="noopener">examples/jsm/csm/CSMFrustum.js</a>
				</p>
			</article>
		</section>
<script src="../scripts/linenumber.js"></script>
<script src="../scripts/page.js"></script>
</body>
</html>